import { ALL_CATEGORY_ITEM } from '@/constants'
export default {
  namespaced: true,
  state: () => {
    return {
      currentCategory: ALL_CATEGORY_ITEM, // 当前选中的分类
      searchText: '', // 搜索框的输入值
      isSearch: false,
      routerType: 'none'
    }
  },
  mutations: {
    // 切换选中的分类
    changeCurrentCategory(state, payload) {
      state.currentCategory = payload
    },
    changeSearchText(state, payload) {
      state.searchText = payload
    },
    changeIsSearch(state, payload) {
      state.isSearch = payload
    },
    changeRouterType(state, payload) {
      state.routerType = payload
    }
  },
  actions: {}
}
